package cn.hacynn.nd.common.context;

/**
 * @Author Hacynn
 * @Date 2024/5/25 15:45
 * @Version 1.0
 */
public class BaseContext {

    public static ThreadLocal<Long> threadLocal = new ThreadLocal<>();

    public static void setCurrentId(Long id) {
        //存入到threadLocal方便后续来进行使用
        threadLocal.set(id);
    }

    public static Long getCurrentId() {
        return threadLocal.get();
    }

    public static void removeCurrentId() {
        threadLocal.remove();
    }

}
